This work is largely based on D3.6, it extends SimPhoNy-Future into a new Package developed specifcally with DOME requirements in mind: Ontology_Manager, OntoVIS and sigraDB.
DomeDataSetfrom D3.6 is in /Users/adham/dev/dome/Ontology-matters/domeo/domeo.ttl
from ontology_manager.ontology_utils import OntologyManager # loading the DOME 4.0 Ontology Manager Package
from rdflib import Graph, URIRef, Namespace, Literal, BNode, collection
from rdflib.namespace import SKOS, RDF, RDFS, OWL
from datetime import date
from rdflib.extras.external_graph_libs import rdflib_to_networkx_multidigraph, rdflib_to_graphtool
import networkx as nx
import matplotlib.pyplot as plt
from ontodot.ontodot import vis, random_date_time, auto_bind_namespaces, printH, generate_uuid, generate_random_materialproject_id
from ontodot.ontodot import OntoVis
from types import SimpleNamespace # We use simple name spaces, it is a basis for the new SimPhpNy Future
import os, random
dome=SimpleNamespace() # This is equivalent to a *SimPhoNy lightweight session*
dome.g=Graph(bind_namespaces="rdflib") # We are using RDFLIB directly, without any wrappers on top of it for efficiency.
dome.ns=Namespace('https://dome40.eu/semantics/dome4.0_core#')
dome.path = "/Users/adham/dev/ontology/dome/Ontology-matters/"
dome.file='dome4.0_core_tbox.ttl'
dome.g.parse(os.path.join(dome.path, dome.file))
<Graph identifier=N6973b87c13804d45832885c342b4caf8 (<class 'rdflib.graph.Graph'>)>
vis(dome.g)
mio=Graph(bind_namespaces="rdflib")
mio.parse("/Users/adham/dev/ontology/ontology_manager/MIO/mio/mio.ttl")
<Graph identifier=N3edc34ad292d44c0b4b7245278a635b9 (<class 'rdflib.graph.Graph'>)>
vis(mio)
We rely on RDFLIB like many other open source programs for RDF management, but augment it with additional tools both in house and external!
# Using the power of RDFLIB it is easy to combine ontology:
gc=dome.g+mio
# Using the new OntoVis: Visualisation and inspection is easy
ovis = OntoVis(gc)
vis(ovis.zoom_in(URIRef("http://dome40.eu/semantics/dome4.0_core#data_set"), 2))
# these are bindings (RDFLIB)
binds="""
@prefix domeES: <http://dome40.eu/semantics/dome4.0_core#> .
@prefix mio: <http://www.ddmd.io/mio/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix euroscivoc: <http://data.europa.eu/8mn/euroscivoc/> .
@prefix evmpo: <https://emmc.eu/semantics/evmpo/evmpo.ttl#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix http-meth: <http://www.w3.org/2011/http-methods#> .
@prefix msm: <http://iserve.kmi.open.ac.uk/ns/msm#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xs: <http://www.w3.org/2001/XMLSchema#> .
"""
cuds=SimpleNamespace() # we use now simple version, no checks for the demo of ontology types
cuds.g=Graph()
cuds_collection=set()
#cuds.ds=URIRef("http://dome40.eu/semantics/dome4.0_core#data_set")
num_data_sets=10 # the number of synthetic data sets we want to create
domeES=nsbinds['domeES']
mioNS=nsbinds['mio']
# Since this is a demo, we make our own creator, publisher, ...
## Note we do not claim any relation to materials project by the following, this is merely a demon.
# these will be instances later of a User/Dataproider etc.
random_creator = lambda: random.choice(["Perosn 1", "Person 2", "Person 3", "Person 4", "Person 5"])
# these will be instances later of a User/Dataproider etc.
random_publisher = lambda: random.choice(["Company 1", "Company 2", "Company 3", "Company 4", "Company 5", "Nature Scientific Data", "MaterialsProject.prg"])
random_keywords = lambda k: random.sample(s.split('\n'), random.randint(3, 6))
MIO+domeES ontology!¶esvoc = SimpleNamespace()
esvoc.g = Graph()
esvoc.desc = "the EuroSciVoc"
esvoc.path = "/Users/adham/dev/dome/Ontology-matters/external/EuroSciVoc-skos-ap-eu_1.3.ttl" # Once we find and end point, we can get this from teh net directly.
esvoc.g.parse(esvoc.path)
# SPARQL query to choose all elements narrower than engineering and technology.
q="""
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?narrowerConcept ?narrowerLabel
WHERE {
?narrowerConcept skos:broader+ <http://data.europa.eu/8mn/euroscivoc/64605fff-1946-4fd4-b021-e2e83b71dcac> .
?narrowerConcept skos:prefLabel ?narrowerLabel .
FILTER(LANGMATCHES(LANG(?narrowerLabel), "en"))
}
"""
# Noe the UUID may change between versions, need to confirm!
# run the query
esvoc.r = esvoc.g.query(q)
#for i in esvoc.r:
# print(i)
printH(f" We find {len(esvoc.r)} semantic keywords relevant for technology and engineering")
We find 208 semantic keywords relevant for technology and engineering: =======================================================================
esvoc.r_formated = [{'IRI': str(row.narrowerConcept), 'Label': str(row.narrowerLabel)} for row in esvoc.r]
esvoc.random = lambda r: random.sample([[r_['IRI'], r_['Label']] for r_ in r], random.randint(2, 6))
for i in range(3):
print(esvoc.random(esvoc.r_formated))
[['http://data.europa.eu/8mn/euroscivoc/c2a8caf5-4ee8-43ff-a3cd-bae7430e4e18', 'supercomputers'], ['http://data.europa.eu/8mn/euroscivoc/0085a6d1-0b32-479f-a560-0cbf6cffee9b', 'astronautical engineering'], ['http://data.europa.eu/8mn/euroscivoc/8d83b645-355f-4cf1-abf3-ce4cd3172c34', 'radio frequency'], ['http://data.europa.eu/8mn/euroscivoc/abadc19a-13ab-4bc6-951b-8f12226b3e8b', 'cognitive radio']] [['http://data.europa.eu/8mn/euroscivoc/ece8d70d-2311-4d6d-ae12-473fc5c09a5d', 'sustainable architecture'], ['http://data.europa.eu/8mn/euroscivoc/e4062af9-fc49-4826-9bdb-e549f3f0f191', 'food technology'], ['http://data.europa.eu/8mn/euroscivoc/eeb88fa8-7b5a-440f-a3c9-add16c6b5cd2', 'mobile radio']] [['http://data.europa.eu/8mn/euroscivoc/7b002931-b33d-4f72-87db-4ae7db02e938', 'bioleaching'], ['http://data.europa.eu/8mn/euroscivoc/c835a32d-04c8-493b-9644-203414287c92', 'composites'], ['http://data.europa.eu/8mn/euroscivoc/e4062af9-fc49-4826-9bdb-e549f3f0f191', 'food technology'], ['http://data.europa.eu/8mn/euroscivoc/53d318ec-2f1b-41e4-8317-24b35f9a9120', 'structural engineering'], ['http://data.europa.eu/8mn/euroscivoc/f08d8dbc-70a6-4d8c-8f83-62e58a17bf2d', 'food safety'], ['http://data.europa.eu/8mn/euroscivoc/7f86cf31-2001-4f17-8941-3318bb68bc21', 'marine energy']]
for i in range(1, num_data_sets + 1):
cuds.ds = URIRef(f"{domeES}DS_{i}")
cuds.uri = URIRef(f"{domeES}DS_{i}")
cuds.g.add((cuds.ds, RDF.type, domeES.data_set))
# Add the required DOME 4.0 Data Set Ontology attributes
# These are cuds.add(spo triplet)
# cuds.uri = URIRef(f"http://materialsproject.org/data/calc_{i}")
mpid=generate_random_materialproject_id()
#uri = URIRef("https://next-gen.materialsproject.org/materials/mp-19149")
uri=URIRef(f"https://next-gen.materialsproject.org/materials/{mpid}")
cuds.g.add( (uri, RDF.type, domeES.URI) )
cuds.g.add((cuds.ds, domeES.hasPart, uri))
printH(f"this is a DOME 4.0 Data Set: {cuds.ds}")
printH(f"this Data Set point to: {uri}")
wp = URIRef("https://next-gen.materialsproject.org/")
cuds.g.add( (wp, RDF.type, domeES.web_platform) )
cuds.g.add((cuds.ds, domeES.hasPart, wp))
dc = URIRef(f"{domeES}/{generate_uuid()}")
cuds.g.add( (dc, RDF.type, domeES.issued_date) )
the_date=Literal(random_date_time())
cuds.g.add( (cuds.ds, domeES.hasPart, dc) )
cuds.g.add( (dc, mioNS.hasValue, the_date) )
dc = URIRef(f"{domeES}/{generate_uuid()}")
cuds.g.add( (dc, RDF.type, domeES.description) )
the_value=Literal("This is a description that will change later")
cuds.g.add( (cuds.ds, domeES.hasPart, dc) )
cuds.g.add( (dc, mioNS.hasValue, the_value) )
dc = URIRef(f"{domeES}/{generate_uuid()}")
cuds.g.add( (dc, RDF.type, domeES.data_creator) )
the_value=Literal(random_creator())
cuds.g.add( (cuds.ds, domeES.hasPart, dc) )
cuds.g.add( (dc, mioNS.hasValue, the_value) )
dc = URIRef(f"{domeES}/{generate_uuid()}")
cuds.g.add( (dc, RDF.type, domeES.license) )
the_value=Literal("CC-BY 4.0")
cuds.g.add( (cuds.ds, domeES.hasPart, dc) )
cuds.g.add( (dc, mioNS.hasValue, the_value) )
dc = URIRef(f"{domeES}/{generate_uuid()}")
cuds.g.add( (dc, RDF.type, domeES.data_publisher) )
the_value=Literal(random_publisher())
cuds.g.add( (cuds.ds, domeES.hasPart, dc) )
cuds.g.add( (dc, mioNS.hasValue, the_value) )
dc = URIRef(f"{domeES}/{generate_uuid()}")
cuds.g.add( (dc, RDF.type, domeES.title) )
the_value=Literal("this is a title placeholder")
cuds.g.add( (cuds.ds, domeES.hasPart, dc) )
cuds.g.add( (dc, mioNS.hasValue, the_value) )
# get some semantic EUROSCIVOC keywords for demo
ks=esvoc.random(esvoc.r_formated)
for k in ks:
print(k[1])
dc = URIRef(k[0])
cuds.g.add( (dc, RDF.type, domeES.semantic_keyword) )
cuds.g.add( (dc, RDFS.label, Literal(k[1]) ))
cuds.g.add( (cuds.ds, domeES.hasPart, dc) )
# g.add((data_set_uri, mio.hasPart, domeES.syntactic_keyword))
this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_1: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-77: ============================================================================== food safety telecommunications environmental biotechnology this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_2: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-91: ============================================================================== other engineering and technologies environmental engineering this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_3: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-27: ============================================================================== computer hardware architecture engineering this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_4: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-113: =============================================================================== electrodialysis civil engineering this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_5: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-75: ============================================================================== solar thermal electric power generation geothermal energy tidal energy this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_6: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-39: ============================================================================== solar energy fossil energy natural gas urban engineering chemical process engineering this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_7: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-131: =============================================================================== reverse osmosis subtractive manufacturing microtechnology environmental engineering drones electronic engineering this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_8: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-84: ============================================================================== fossil energy urban engineering geological engineering this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_9: ========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-45: ============================================================================== metabolic engineering wearable medical technology this is a DOME 4.0 Data Set: http://dome40.eu/semantics/dome4.0_core#DS_10: =========================================================================== this Data Set point to: https://next-gen.materialsproject.org/materials/mp-27: ============================================================================== hydrogen energy mechatronics nanocrystals radar WiFi
g.add((someURI, RDF.type, domeES.data_set))
gc=cuds.g+dome.g+mio
ovis = OntoVis(gc)
vis(ovis.zoom_in(URIRef("http://dome40.eu/semantics/dome4.0_core#DS_2"), 3))
inspect_iri=URIRef("http://dome40.eu/semantics/dome4.0_core#DS_2")
q="""
SELECT ?predicate ?object
WHERE {
<http://dome40.eu/semantics/dome4.0_core#DS_2> ?predicate ?object .
}
"""
DS99 = Graph()
r=gc.query(q)
for i in r:
DS99.add((inspect_iri, i.predicate, i.object))
q2 = f"""
SELECT ?predicate ?object
WHERE {{
<{i.object}> ?predicate ?object .
}}
"""
r2 = gc.query(q2)
for j in r2:
DS99.add((j.object, j.predicate, j.object))
print(j.object, j.predicate, j.object)
http://dome40.eu/semantics/dome4.0_core#data_creator http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#data_creator Perosn 1 http://www.ddmd.io/mio/hasValue Perosn 1 environmental engineering http://www.w3.org/2000/01/rdf-schema#label environmental engineering http://dome40.eu/semantics/dome4.0_core#semantic_keyword http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#semantic_keyword http://dome40.eu/semantics/dome4.0_core#title http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#title this is a title placeholder http://www.ddmd.io/mio/hasValue this is a title placeholder http://dome40.eu/semantics/dome4.0_core#data_publisher http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#data_publisher Company 1 http://www.ddmd.io/mio/hasValue Company 1 http://dome40.eu/semantics/dome4.0_core#web_platform http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#web_platform http://dome40.eu/semantics/dome4.0_core#description http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#description This is a description that will change later http://www.ddmd.io/mio/hasValue This is a description that will change later http://dome40.eu/semantics/dome4.0_core#URI http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#URI http://dome40.eu/semantics/dome4.0_core#semantic_keyword http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#semantic_keyword other engineering and technologies http://www.w3.org/2000/01/rdf-schema#label other engineering and technologies CC-BY 4.0 http://www.ddmd.io/mio/hasValue CC-BY 4.0 http://dome40.eu/semantics/dome4.0_core#license http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#license http://dome40.eu/semantics/dome4.0_core#issued_date http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#issued_date 2024-10-03T16:11:04.494639 http://www.ddmd.io/mio/hasValue 2024-10-03T16:11:04.494639 http://dome40.eu/semantics/dome4.0_core#web_platform http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#web_platform http://dome40.eu/semantics/dome4.0_core#data_creator http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#data_creator http://dome40.eu/semantics/dome4.0_core#syntactic_keyword http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#syntactic_keyword http://dome40.eu/semantics/dome4.0_core#license http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#license http://dome40.eu/semantics/dome4.0_core#name http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#name http://dome40.eu/semantics/dome4.0_core#description http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#description http://dome40.eu/semantics/dome4.0_core#issued_date http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#issued_date http://dome40.eu/semantics/dome4.0_core#URI http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#URI http://dome40.eu/semantics/dome4.0_core#data_publisher http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#data_publisher http://dome40.eu/semantics/dome4.0_core#title http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#title http://dome40.eu/semantics/dome4.0_core#semantic_keyword http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#semantic_keyword A dome specific representation of a Semantic Data Set http://www.w3.org/2000/01/rdf-schema#comment A dome specific representation of a Semantic Data Set http://www.ddmd.io/mio/SDS http://www.w3.org/2000/01/rdf-schema#subClassOf http://www.ddmd.io/mio/SDS Dome Data Set http://www.w3.org/2000/01/rdf-schema#label Dome Data Set http://www.w3.org/2002/07/owl#Class http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#Class
for s, p, o in DS99:
print(s, p, o)
Perosn 1 http://www.ddmd.io/mio/hasValue Perosn 1 this is a title placeholder http://www.ddmd.io/mio/hasValue this is a title placeholder http://dome40.eu/semantics/dome4.0_core#issued_date http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#issued_date http://dome40.eu/semantics/dome4.0_core#URI http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#URI http://dome40.eu/semantics/dome4.0_core#name http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#name http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart https://next-gen.materialsproject.org/ other engineering and technologies http://www.w3.org/2000/01/rdf-schema#label other engineering and technologies 2024-10-03T16:11:04.494639 http://www.ddmd.io/mio/hasValue 2024-10-03T16:11:04.494639 http://dome40.eu/semantics/dome4.0_core#web_platform http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#web_platform http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart http://dome40.eu/semantics/dome4.0_core#/deac7486-443e-4562-bf46-8dac13fdb214 http://dome40.eu/semantics/dome4.0_core#data_creator http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#data_creator http://www.w3.org/2002/07/owl#Class http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#Class CC-BY 4.0 http://www.ddmd.io/mio/hasValue CC-BY 4.0 environmental engineering http://www.w3.org/2000/01/rdf-schema#label environmental engineering http://dome40.eu/semantics/dome4.0_core#issued_date http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#issued_date Dome Data Set http://www.w3.org/2000/01/rdf-schema#label Dome Data Set http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart http://data.europa.eu/8mn/euroscivoc/14e75836-6f05-46f9-9c82-ca12468b0452 http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart http://dome40.eu/semantics/dome4.0_core#/bc845dd9-c77a-458a-aea6-57408c488588 http://dome40.eu/semantics/dome4.0_core#license http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#license This is a description that will change later http://www.ddmd.io/mio/hasValue This is a description that will change later http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart http://dome40.eu/semantics/dome4.0_core#/f41305a4-6862-419c-96ae-ab685aef22b4 http://dome40.eu/semantics/dome4.0_core#description http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#description http://dome40.eu/semantics/dome4.0_core#web_platform http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#web_platform http://dome40.eu/semantics/dome4.0_core#syntactic_keyword http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#syntactic_keyword http://dome40.eu/semantics/dome4.0_core#data_publisher http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#data_publisher http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart http://dome40.eu/semantics/dome4.0_core#/ad874460-c0b2-4457-b200-3b899b762cf4 http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart http://dome40.eu/semantics/dome4.0_core#/e56f921c-883f-44c3-bf90-f4af5713b06a http://dome40.eu/semantics/dome4.0_core#title http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#title Company 1 http://www.ddmd.io/mio/hasValue Company 1 http://dome40.eu/semantics/dome4.0_core#DS_2 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#data_set http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart https://next-gen.materialsproject.org/materials/mp-91 http://dome40.eu/semantics/dome4.0_core#semantic_keyword http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#semantic_keyword http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart http://dome40.eu/semantics/dome4.0_core#/1b77a25d-2402-44d1-80d6-b5454f7b3fef http://dome40.eu/semantics/dome4.0_core#DS_2 http://dome40.eu/semantics/dome4.0_core#hasPart http://data.europa.eu/8mn/euroscivoc/531bd18a-eedd-4345-8b2f-5464f96615f8 http://dome40.eu/semantics/dome4.0_core#data_publisher http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#data_publisher http://dome40.eu/semantics/dome4.0_core#title http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#title http://dome40.eu/semantics/dome4.0_core#license http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#license http://dome40.eu/semantics/dome4.0_core#description http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#description http://www.ddmd.io/mio/SDS http://www.w3.org/2000/01/rdf-schema#subClassOf http://www.ddmd.io/mio/SDS A dome specific representation of a Semantic Data Set http://www.w3.org/2000/01/rdf-schema#comment A dome specific representation of a Semantic Data Set http://dome40.eu/semantics/dome4.0_core#semantic_keyword http://www.ddmd.io/mio/hasPart http://dome40.eu/semantics/dome4.0_core#semantic_keyword http://dome40.eu/semantics/dome4.0_core#URI http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#URI http://dome40.eu/semantics/dome4.0_core#data_creator http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://dome40.eu/semantics/dome4.0_core#data_creator
vis(DS99)
q = """
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX domeES: <http://dome40.eu/semantics/dome4.0_core#>
SELECT ?s ?p ?o ?oLabel
WHERE {
?s ?p ?o .
?o rdfs:label ?oLabel .
?o rdfs:label "medical engineering" .
}
"""
r=gc.query(q)
for i in r:
print(i)